<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/taglibs.jsp"%>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<c-rt:if test="${!empty param.name}">
	<c-rt:set var="workFlow" value="${pu:get('com.yaodian100.crm.workflow.entity.WorkFlow', param.name)}"/>
</c-rt:if>
<script>
$(document).ready(function(){
	$('#submit_button').click(function(){
		var form;
		doAR('<%=application.getContextPath() %>/workFlow/updateFlow.do', 'rightSide', 'theForm', function(){
		doAR('<%=application.getContextPath() %>/workFlow/page.do?iamlazy=leftSide&focused=theFlowTree','leftSide');
		}
		);
	});
});
</script>
<h1>
<c-rt:if test="${empty workFlow}">
新增
</c-rt:if>
<c-rt:if test="${!empty workFlow}">
修改
</c-rt:if>
流程</h1>

<form method="post" id="theForm" name="theForm">
<table class="tb-data" width="100%">
<tr><th width="130px">name</th><td>
<c-rt:if test="${!empty workFlow}">
${workFlow.name }<input type="hidden" name="name" value="${workFlow.name }"/>
</c-rt:if>
<c-rt:if test="${empty workFlow}">
<input type="text" name="name" value="${workFlow.name }"/>
</c-rt:if>
</td></tr>
<tr><th width="130px">description</th><td><input type="text" name="description" value="${workFlow.description }"/></td></tr>
<tr><th width="130px">必须返回主单</th><td>
<input type="radio" name="mustReturnMaster" value="true" <c-rt:if test="${empty workFlow || workFlow.mustReturnMaster=='true' }">checked="checked"</c-rt:if>/>需要
<input type="radio" name="mustReturnMaster" value="false" <c-rt:if test="${workFlow.mustReturnMaster=='false' }">checked="checked"</c-rt:if>/>不需要
</td></tr>
	<tr>
	<th></th><td><input type="button" id="submit_button" value="送出"/>
	<input type="reset" value="重设"/>
	</td>
	</tr>
	
	</table>
</form>

